<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title></title>
		<meta name="description" content="overview & stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link href="static/css/bootstrap.min.css" rel="stylesheet" />
		<link href="static/css/bootstrap-responsive.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="static/css/font-awesome.min.css" />
		<!-- 下拉框 -->
		<link rel="stylesheet" href="static/css/chosen.css" />
		
		<link rel="stylesheet" href="static/css/ace.min.css" />
		<link rel="stylesheet" href="static/css/ace-responsive.min.css" />
		<link rel="stylesheet" href="static/css/ace-skins.min.css" />
		
		<link rel="stylesheet" href="static/css/datepicker.css" /><!-- 日期框 -->
		<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="static/js/jquery.tips.js"></script>
		
<script type="text/javascript">
	function save(){
		var TITLE_ID= $.trim($("#TITLE_ID").val());
		var SUPERVISOR_NAME= $.trim($("#SUPERVISOR").val());
		$.ajax({
			type:"POST",
			url:'<%=basePath%>thesis/choice.do',
//			data:{TITLE_ID:TITLE_ID,SUPERVISOR_NAME:SUPERVISOR_NAME,tm:new Date().getTime()},
			data:$('#Form').serialize(),
			dataType:'json',
			cache:false,
			error:function(){
				 alert("服务器异常")
			},
			success:function(data){
				if(data.result=="sussess") {
					alert("选题成功");
					//					window.location.href="thesis/myTitle.do"
				}
				else {
					alert(data.result);

				}

			}
		});



	}



</script>
	</head>
<body>
<c:choose>
<c:when test="${not empty pd}">
	<form action="#" name="Form" id="Form" method="post">
		<input type="hidden" name="TITLE_ID" id="TITLE_ID" value="${pd.TITLE_ID}"/>
		<input type="hidden" name="DEPARTMENT_XI" id="DEPARTMENT_XI" value="${pd.DEPARTMENT_XI}"/>
		<div id="zhongxin">
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">题目:</td>
				<td><input readonly="true" type="text" name="TITLE_NAME" id="TITLE_NAME" value="${pd.TITLE_NAME}" maxlength="32" title="题目"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">题目要求:</td>
				<td><input readonly="true" type="text" name="YAOQIU" id="YAOQIU" value="${pd.YAOQIU}" maxlength="32"  title="题目要求"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">课题类型方向:</td>
				<td><input readonly="true" type="text" name="FANGXIANG" id="FANGXIANG" value="${pd.FANGXIANG}" maxlength="32" title="课题类型方向"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">课题来源:</td>
				<td><input readonly="true" type="text" name="LAIYUAN" id="LAIYUAN" value="${pd.LAIYUAN}" maxlength="32" title="课题来源"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">限选学院:</td>
				<td><input readonly="true" type="text" name="DEPARTMENT_NAME" id="DEPARTMENT_NAME" value="${pd.DEPARTMENT_NAME}" maxlength="32" title="限选学院"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">限选 本专科:</td>
				<td><input readonly="true" type="text" name="XIANXUAN" id="XIANXUAN" value="${pd.XIANXUAN}" maxlength="32" title="限选 本专科:"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">出题导师姓名:</td>
				<td><input readonly="true" type="text" name="SUPERVISOR" id="SUPERVISOR" value="${pd.SUPERVISOR}" maxlength="32" title="出题导师姓名"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">限选人数:</td>
				<td><input readonly="true" type="text" name="MAXNUMBER" id="MAXNUMBER" value="${pd.MAXNUMBER}" maxlength="32" title="限选人数"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">实际选人数:</td>
				<td><input type="text" name="CURRENTNUMBER" id="CURRENTNUMBER" value="${pd.CURRENTNUMBER}" maxlength="32" readonly="true" title="实际选人数"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">导师联系电话号码:</td>
				<td><input type="text" readonly="true" name="TELPHONE" id="TELPHONE" value="${pd.TELPHONE}" maxlength="32"   title="导师联系电话号码"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">0不需要确认   1:需要双向确认:</td>
				<td><input readonly="true" type="text" name="IS_AFFIRM" id="IS_AFFIRM" value="${pd.IS_AFFIRM}" maxlength="32"  /></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">导师QQ号码:</td>
				<td><input readonly="true" type="text" name="QQ" id="QQ" value="${pd.QQ}" maxlength="32" title="导师QQ号码"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">导师电子邮箱:</td>
				<td><input type="text" name="EMAIL" id="EMAIL" value="${pd.EMAIL}" maxlength="32" readonly="true" title="导师电子邮箱"/></td>
			</tr>
			<%--<tr>
				<td style="text-align: center;" colspan="10">
					<a class="btn btn-mini btn-primary" onclick="save();">提交选题</a>
					<a class="btn btn-mini btn-danger" href="thesis/thesistitle_list.do" &lt;%&ndash;onclick="top.Dialog.close();&ndash;%&gt;>取消</a>
				</td>
			</tr>--%>
		</table>
		</div>
		<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
	</form>
</c:when>
	<c:otherwise>
		<tr class="main_info">
			<td colspan="100" class="center" >你还没有选题,<a href="thesis/thesistitle_list.do">点此可进行选题</a></td>
		</tr>
	</c:otherwise>
</c:choose>
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 下拉框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		<script type="text/javascript">
		$(top.hangge());
		$(function() {
			
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			
			//日期框
			$('.date-picker').datepicker();
			
		});
		
		</script>
</body>
</html>